package com.example.service.impl;

import com.example.service.SoilService;
import com.example.domain.Soil;
import com.example.mapper.SoilMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SoilServiceImpl implements SoilService {

    @Autowired
    private SoilMapper soilMapper;

    @Override
    public List<Soil> getAll() {
        return soilMapper.getAll();
    }

    @Override
    public Soil getById(Integer soilId) {
        return soilMapper.getById(soilId);
    }

    @Override
    public boolean add(Soil soil) {
        return soilMapper.add(soil);
    }

    @Override
    public boolean update(Soil soil) {
        return soilMapper.update(soil);
    }

    @Override
    public boolean delete(Integer soilId) {
        return soilMapper.delete(soilId);
    }
}
